
import api from '../fetch/api.js'

const actions = {
    /**
     * 领导端）API/获取建议状态统计列表
     * @param {*} param0
     * @param {*} params
     */
    async getCountEventByStatus({rootState, commit}, params) {
        return await api.mineBaseMsgApi(rootState.Host + '/itfer-qkfy/rest/leader/getCountEventByStatus')
    },
    /**
     * （领导端）API/获取建议类型统计列表
     * @param {*} param0
     * @param {*} params
     */
    async getCountEventByType({rootState, commit}, params) {
        return await api.mineBaseMsgApi(rootState.Host + '/itfer-qkfy/rest/leader/getCountEventByType')
    },
    /**
     * （领导端）API/获取建议处理数TOP10
     * @param {*} param0
     * @param {*} params
     */
    async getCountTopList({rootState, commit}, params) {
        return await api.mineBaseMsgApi(rootState.Host + '/itfer-qkfy/rest/leader/getCountTopList')
    },
    /**
     * （领导端）API/获取建议处理时间分析
     * @param {*} param0
     * @param {*} params
     */
    async getCountTime({rootState, commit}, params) {
        return await api.mineBaseMsgApi(rootState.Host + '/itfer-qkfy/rest/leader/getCountTime')
    },
    /**
     * （领导端）API/按建议状态获取建议列表
     * @param {*} param0
     * @param {*} params
     */
    async getAllEventByStatus({rootState, commit}, params) {
        return await api.mineBaseMsgApi(rootState.Host + '/itfer-qkfy/rest/leader/getAllEventByStatus/' + params.event_status + '/' + params.pages)
    },
    /**
     * （领导端）API/按建议类型获取建议列表
     * @param {*} param0
     * @param {*} params
     */
    async getAllEventByType({rootState, commit}, params) {
        return await api.mineBaseMsgApi(rootState.Host + '/itfer-qkfy/rest/leader/getAllEventByType/' + params.type_id + '/' + params.pages)
    },
}

export default actions
